package com.xsqf.jt808.common.config;

import java.nio.charset.Charset;

/**
 * @Author:
 * @Date: 2020-5-14
 * @Description: JT808协议参数集合
 * @Version: 1.0
 */
public class JT808Const {

    //默认字符集为GBK
    public static final Charset DEFAULT_CHARSET = Charset.forName("GBK");

    //消息分隔符
    public static final byte PKG_DELIMITER = 0x7e;

    // 终端应答
    public static final short TERNIMAL_RESP_COMMON_ = 0x0001; //通用应答
    public static final short TERNIMAL_RESP_PARAMETER_ = 0x0104; //查询终端参数应答
    public static final short TERNIMAL_RESP_ATTRIBUTE_ = 0x0107; //查询终端属性应答

    public static final short TERNIMAL_RESP_LOCATION_ = 0x0201; //查询位置信息应答

    // 终端消息分类
    public static final short TERNIMAL_MSG_HEARTBEAT = 0x0002; //心跳
    public static final short TERNIMAL_MSG_REGISTER = 0x0100; //注册
    public static final short TERNIMAL_MSG_LOGOUT = 0x0003;//注销
    public static final short TERNIMAL_MSG_AUTH = 0x0102;//鉴权
    public static final short TERNIMAL_MSG_LOCATION = 0x0200;//位置


    //服务器应答
    public static final short SERVER_RESP_COMMON = (short) 0x8001;//通用应答
    public static final short SERVER_RESP_REGISTER = (short) 0x8100;//注册应答

    //服务器指令
    public static final short SERVER_MSG_SET_TERNIMAL_PARAMETER = (short) 0x8103;//设置终端参数
    public static final short SERVER_MSG_GET_TERNIMAL_PARAMETER = (short) 0x8104;//查询终端参数
    public static final short SERVER_MSG_GET_APPOINT_TERNIMAL_PARAMETER = (short) 0x8106;//查询指定终端参数

    public static final short SERVER_MSG_GET_TERNIMAL_ATTRIBUTE = (short) 0x8107;//查询终端属性

    public static final short SERVER_MSG_CONTROL_TERNIMAL = (short) 0x8105;//终端控制

    public static final short SERVER_MSG_FIND_LOCATION = (short) 0x8201;//位置信息查询

    public static final short SERVER_MSG_ARTIFICIAL_CONFIRM_ALARM_INFO = (short) 0x8203;//人工确认报警消息

    //数据透传
    public static final short SERVER_MSG_DATA_PASSTHROUGH = (short) 0x8900;//数据下行透传
    public static final short TERNIMAL_MSG_DATA_PASSTHROUGH = (short) 0x0900;//数据上行透传


}
